package com.gzhryc.shared_device.oem.code.member.dao.enums;

public class MemberRechargeOrderEnum {
	
	public static enum SourceType {

        Recharge(1,"直充"),Refund(2,"退款");

        private Integer index;
        private String note;

        SourceType(Integer index,String note){
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index){
        	SourceType[] temp = SourceType.values();
            for(int i=0;i<temp.length;i++){
            	SourceType item = temp[i];
                if(item.index.equals(index)){
                    return item.note;
                }
            }
            return null;
        }
    }

    public static enum State {

        WaitPay(1, "等待支付"), Success(2, "充值成功"), RefundFinish(3, "已退完")
        , Fail(4, "充值失败"), SuccessEnd(5, "充值成功(不可退款)");

        private Integer index;
        private String note;

        State(Integer index, String note) {
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index) {
            State[] temp = State.values();
            for (int i = 0; i < temp.length; i++) {
                State item = temp[i];
                if (item.index.equals(index)) {
                    return item.note;
                }
            }
            return null;
        }
    }

    public static enum OperateState {

        Normal(1,"正常"),Refunding(2,"退款中");

        private Integer index;
        private String note;

        OperateState(Integer index,String note){
            this.index = index;
            this.note = note;
        }

        public Integer index() {
            return index;
        }

        public String note() {
            return note;
        }

        public static String note(Integer index){
            OperateState[] temp = OperateState.values();
            for(int i=0;i<temp.length;i++){
                OperateState item = temp[i];
                if(item.index.equals(index)){
                    return item.note;
                }
            }
            return null;
        }
    }
}
